/* USER CODE BEGIN Header */
/**
 ******************************************************************************
 * @file           : main.h
 * @brief          : Header for main.c file.
 *                   This file contains the common defines of the application.
 ******************************************************************************
 * @attention
 *
 * Copyright (c) 2025 STMicroelectronics.
 * All rights reserved.
 *
 * This software is licensed under terms that can be found in the LICENSE file
 * in the root directory of this software component.
 * If no LICENSE file comes with this software, it is provided AS-IS.
 *
 ******************************************************************************
 */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

typedef struct
{
	uint8_t exec_state;
	uint8_t exec_current_pos;
	uint8_t Coil_num;
	uint8_t CoilData[8];
	uint8_t exec_time;
}moreCoilData;

typedef struct
{
	uint8_t exec_state;
	uint8_t Coil_state;
	uint8_t exec_time;
}oneCoilData;

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define maxLock_Pin GPIO_PIN_13
#define maxLock_GPIO_Port GPIOC
#define minLock_Pin GPIO_PIN_14
#define minLock_GPIO_Port GPIOC
#define LED3_Pin GPIO_PIN_0
#define LED3_GPIO_Port GPIOA
#define LED2_Pin GPIO_PIN_1
#define LED2_GPIO_Port GPIOA
#define KEY8_Pin GPIO_PIN_2
#define KEY8_GPIO_Port GPIOA
#define KEY7_Pin GPIO_PIN_3
#define KEY7_GPIO_Port GPIOA
#define KEY6_Pin GPIO_PIN_4
#define KEY6_GPIO_Port GPIOA
#define KEY5_Pin GPIO_PIN_5
#define KEY5_GPIO_Port GPIOA
#define KEY4_Pin GPIO_PIN_6
#define KEY4_GPIO_Port GPIOA
#define KEY3_Pin GPIO_PIN_7
#define KEY3_GPIO_Port GPIOA
#define KEY2_Pin GPIO_PIN_0
#define KEY2_GPIO_Port GPIOB
#define KEY1_Pin GPIO_PIN_1
#define KEY1_GPIO_Port GPIOB
#define LED4_Pin GPIO_PIN_12
#define LED4_GPIO_Port GPIOB
#define LED5_Pin GPIO_PIN_13
#define LED5_GPIO_Port GPIOB
#define LED6_Pin GPIO_PIN_14
#define LED6_GPIO_Port GPIOB
#define LED7_Pin GPIO_PIN_15
#define LED7_GPIO_Port GPIOB
#define LED8_Pin GPIO_PIN_8
#define LED8_GPIO_Port GPIOA
#define LED1_Pin GPIO_PIN_12
#define LED1_GPIO_Port GPIOA
#define PING1_Pin GPIO_PIN_15
#define PING1_GPIO_Port GPIOA
#define PING2_Pin GPIO_PIN_3
#define PING2_GPIO_Port GPIOB
#define PING3_Pin GPIO_PIN_4
#define PING3_GPIO_Port GPIOB
#define PING4_Pin GPIO_PIN_5
#define PING4_GPIO_Port GPIOB
#define PING5_Pin GPIO_PIN_6
#define PING5_GPIO_Port GPIOB
#define PING6_Pin GPIO_PIN_7
#define PING6_GPIO_Port GPIOB
#define PING7_Pin GPIO_PIN_8
#define PING7_GPIO_Port GPIOB
#define PING8_Pin GPIO_PIN_9
#define PING8_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
